import {defaultAxios as request } from '@/utils/http/index.js';
var api = "/rtdb/api/tdengine/write";

// export const userRegister = (data) => {
//   return request({
//     url: '/showDatabase',
//     method: 'post',
//     data,
//   });
// };


export function initTdengineDatbase(data = {},timeout=200000) {
  return request({
    url: api + '/initTdengineDatbase',
    method: 'post',
    data,
    timeout: timeout
  });
}

export function createTdengineTables(data = {},timeout=200000) {
  return request({
    url: api + '/createTdengineTables',
    method: 'post',
    data,
    timeout: timeout
  });
}

export function beginTDengineWrite(data = {},timeout=200000) {
  return request({
    url: api + '/beginTDengineWrite',
    method: 'post',
    data,
    timeout: timeout
  });
}

export function stopTDengineWrite(data = {},timeout=200000) {
  return request({
    url: api + '/stopTDengineWrite',
    method: 'post',
    data,
    timeout: timeout
  });
}

export function getTDengineWriteStatus(data = {},timeout=200000) {
  return request({
    url: api + '/getTDengineWriteStatus',
    method: 'post',
    data,
    timeout: timeout
  });
}


